//
//  SelfSizeTool.m
//  UI10-CellSelfSize
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SelfSizeTool.h"
#import "UIView+Frame.h"

@implementation SelfSizeTool
+ (CGFloat)SelfSizeWithString:(NSString *)string width:(CGFloat)width font:(UIFont *)font
{
    
     CGRect newRect = [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options: NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:17]} context:nil];
    return newRect.size.height;
}


@end
